package com.example.entity;

/**
 * 学生实体类
 */
public class Student {
    private Integer id;
    private String name;
    private Integer age;
    private String major;

    // 无参构造方法（Spring需要）
    public Student() {}

    // getter和setter方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    @Override
    public String toString() {
        return "Student{id=" + id + ", name='" + name + "', age=" + age + ", major='" + major + "'}";
    }
}
    